#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int a, b, shang, yu;
    scanf("%d %d", &a, &b);
    shang = a / b;
    yu = a % b;
    printf("%d %d", shang, yu);
    return 0;
}